# (Arch Linux) Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# (Arch Linux) Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu>
# Maintainer: Ray Donnelly <mingw.android@gmail.com>

pkgname=elfutils
pkgver=0.159
pkgrel=1
pkgdesc="Libraries and utilities to handle ELF object files and DWARF debugging information"
arch=('i686' 'x86_64')
url="https://fedorahosted.org/elfutils/"
license=('LGPL3' 'GPL' 'GPL3')
depends=('gcc-libs' 'zlib' 'bzip2' 'xz')
provides=('libelf')
replaces=('libelf')
conflicts=('libelf')
source=(https://fedorahosted.org/releases/e/l/elfutils/${pkgver}/elfutils-${pkgver}.tar.bz2)
options=('staticlibs')
sha1sums=('4ff214cdb95a10b03cf413f3d018393a838f98fc')

build() {
  cd ${pkgname}-${pkgver}

  CFLAGS+=" -g"  # required for test-suite success
  ./configure --prefix=/usr --program-prefix="eu-"

  make
}

check() {
  cd ${pkgname}-${pkgver}

  make check
}

package() {
  cd ${pkgname}-${pkgver}

  make DESTDIR="${pkgdir}" install
}
